package com.heatingcharge.controller.unit;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.heatingcharge.common.util.R;
import com.heatingcharge.dto.HouseChangeRecordDTO;
import com.heatingcharge.dto.ResHouseDTO;
import com.heatingcharge.entity.unit.ResHouse;
import com.heatingcharge.service.unit.IHouseChangeRecordService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * 房屋信息 前端控制器
 * </p>
 *
 * @author devin.jiang
 * @since 2019-10-22
 */
@RestController
@RequestMapping("/house-change-record")
public class HouseChangeRecordController {
    @Autowired
    IHouseChangeRecordService houseChangeRecordService;

    @ApiOperation(value = "分页获取房屋变更信息",notes = "分页获取房屋变更信息")
    @GetMapping
    public R getHouseChangeRecord(Page page, HouseChangeRecordDTO houseChangeRecordDTO){
        IPage<HouseChangeRecordDTO> houseChangeRecordDTOIPage = houseChangeRecordService.getHouseChangeRecords(page, houseChangeRecordDTO);
        return R.ok(houseChangeRecordDTOIPage);
    }
}

